//
//  HotViewcontroller.m
//  YSBEmployer
//
//  Created by developer on 2021/12/05.
//  Copyright © 2021 ysb. All rights reserved.
//

#import "YSBWithdrawalRecordCell.h"

@implementation YSBWithdrawalRecordCell

- (void)setModel:(YSBRecordModel *)model {
    _model = model;
    
    self.typeLabel.text = [YSBCommonTool isBlankString:model.type] ? @"提现" : model.type;

//    //到账金额
//    NSString *credited = [YSBCommonTool isBlankString:model.credited] ? @"" : model.credited;

    NSString *total = [YSBCommonTool isBlankString:model.total] ? @"" : model.total;
    self.moneyLabel.text = [NSString stringWithFormat:@"-%@",total];
    
    self.timeLabel.text = [YSBCommonTool isBlankString:model.created_at] ? @"" : model.created_at;
    self.statusLabel.text = [YSBCommonTool isBlankString:model.status_text] ? @"" : model.status_text;
    
    //提现金额和手续费
    NSString *fee = [YSBCommonTool isBlankString:model.fee] ? @"--" : model.fee;
    self.cashLabel.text = [NSString stringWithFormat:@"提现金额: %@元   手续费: %@元",total,fee];
    
    self.statusLabel.textColor = model.statusColor;
    
    
    //失败原因
    self.resonTextView.hidden = YES;
    
    [self.resonTextView mas_updateConstraints:^(MASConstraintMaker *make) {
        make.height.mas_greaterThanOrEqualTo(@0);
    }];
    
}

@end
